1. Field of the Invention
The present invention relates generally to a method of providing a familiar word processor copy-and-paste paradigm for editing template-based programs that transform tree structures such as documents in the eXtensible Mark-up Language (XML) format. As an exemplary embodiment, an XSLT (eXtensible Style Language Transformations) stylesheet editor incorporates this copy-and-paste method as one of its additional features.
2. Description of the Related Art
A conventional method of deploying an XML processor written as an XSLT stylesheet is shown in overview in FIG. 1. An XSLT stylesheet 10 includes a set of rules that describe how to process elements of an input XML document 11 to transform these into elements of the XML output document 12. The actual transformation is executed by an XSLT-based transformation engine 13 that reads the rules of the XSLT stylesheet and executes the corresponding transformation of 11 to 12. In this way the stylesheet 10 and transformation engine 13 together form an XML processor whose operation is fully defined by the XSLT stylesheet, i.e., each rule of the stylesheet 10 matches one or more elements in the input document and describes the actions to take and the output to produce when a matching element is found.
An XSLT stylesheet expresses directly how a source XML is transformed into a result XML for presentation or further processing. Execution of an XSLT stylesheet is non-sequential. It is not like a program written in conventional programming languages such as C, C++, Java, Basic, FORTRAN, Cobol, etc. This, however, makes the development of XSLT stylesheets very different from development of XML processing programs in conventional programming languages such as C, C++, Java, or Visual Basic. It has a very different execution paradigm than those to which they are accustomed.
This means that tools for understanding execution of an XSLT stylesheet can be very different than similar tools for sequential programming languages, such as “debuggers.” The major task in developing XSLT stylesheets is structuring the stylesheet into rules that fit the source data to be processed. Creating or changing the rules in an XSLT stylesheet is difficult and complex because of the need for the user to understand the relationship between the input document, the stylesheet rules and the output document.
Current editors for XSLT stylesheets fail to provide features and tools that facilitate editing of specific syntax-based documents such as the tree structure of XML. More specific to the present invention, current XSLT stylesheet editors fail to provide a copy-and-paste feature for editing of an XSLT stylesheet based on reorganisation of visual elements of the XML output structure.